package com.coolwen.spring.aop.base;

/**
 * @author CoolWen
 * @version 2020-03-19 8:50
 */
public class Test {
    public static void main(String[] args) {

        //常用的方法
//        ICalFibonacci icf = new CalFibonacciImpl();
//        long n = 1500000;
//        System.out.println(icf.calFibonacciByLoop(n));
//        System.out.println(icf.calFibonacciByRecusion(n));
//        System.out.println(icf.stat(0, n));
//        System.out.println(icf.stat(1, n));

        //静态代理的方法
//        ICalFibonacci icf = new CalFibonacciProxy(new CalFibonacciImpl());
//        long n = 15000000;
//        long n1 = icf.calFibonacciByLoop(n);
//        long n2 = icf.calFibonacciByRecusion(n);

        long n = 40;
        ICalFibonacci proxy = (ICalFibonacci) PerformProxy.getInstace(new CalFibonacciImpl());
        proxy.calFibonacciByLoop(n);
        proxy.calFibonacciByRecusion(n);
    }
}
